<!doctype html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>我的门店</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<script src="js/mui.min.js"></script>
		<script src="js/mui.picker.min.js"></script>
		<link href="css/style.css" rel="stylesheet" />
		<link href="css/reg_style.css" rel="stylesheet" />
		<link href="css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="css/mui.picker.min.css">
		<link href="css/ljq.css" rel="stylesheet" />
		<style>
			* {
				margin: 0;
				padding: 0;
			}
			.head1{
				position: relative;
				background: #fff;
			}
			.mendian{
				font-size: 0.14rem;
				color: #4198FF;
				width: 0.7rem!important;
				position: absolute;
				top: 0;
				right: 0;
				display: none;
			}
			.line-wrapper {
				width: 100%;
				height: 0.44rem;
				line-height: 0.44rem;
				overflow: hidden;
				font-size: 0.14rem;
				color: #4d4d4d;
				border-bottom: 1px solid #ccc;
			}
			
			.line-wrapper:first-child {
/*				margin-top: 0.5rem;*/
			}
			
			.line-scroll-wrapper {
				white-space: nowrap;
				clear: both;
				height: 0.44rem;
			}
			
			.line-btn-delete {
				float: left;
				width: 0.9rem;
				height: 0.44rem;
				background: red;
				border: none;
				font-size: 0.14rem;
				font-family: 'Microsoft Yahei';
				color: #fff;
			}
			
			.line-normal-wrapper {
				display: inline-block;
				float: left;
				height: 0.44rem;
				padding-top: 16px;
			}
			
			.line-normal-wrapper img {
				float: right;
				margin-right: 0.12rem;
				width: 0.15rem;
				height: 0.15rem;
			}
			
			.line-normal-user-name {
				float: left;
				height: 0.15rem;
				line-height: 0.15rem;
				color: #4e4e4e;
				margin-left: 24px;
				margin-bottom: 0.1rem;
			}
			.line-normal-user-name span{
				margin-left: 0.1rem!important;
			}
			.add {
				position: fixed;
				left: 0;
				bottom: 0;
				width: 100%;
				height: 0.49rem;
				background: url(img/beijing.png)no-repeat center center;
			}
			
			.add img {
				float: left;
				width: 4%;
				background: contain;
				margin-top: 0.17rem;
				margin-left: 40%;
			}
			
			.add span {
				float: left;
				font-size: 0.14rem;
				margin: 0 auto;
				color: #fff;
				margin-top: 0.15rem;
				margin-left: 2%;
			}
			
		</style>
		<script type="text/javascript">
			mui.init();
		</script>
	</head>

	<body onresize="windowSizeChange();">
		<header class="mui-bar mui-bar-nav head1">
			<em class="mui-action-back"><img class="img1" src="img/fanhui.png" alt="" /></em>
			<div class="div1"><span class="span0">我的门店</span></div>
			<a href="me_store_editor.html" class="img2 mendian" id="me_store_editor">门店管理</a>
		</header>
		<div id="mine-shop-lists">
			
		</div>
		<div class="add" onclick="javascript:window.location.href='me_user_bind.html'">
			<img src="img/add.png" alt="" /><span>添加门店</span>
		</div>

		<!--/********************日期控件**************************/-->
		<!--<link rel="stylesheet" type="text/css" href="css/hgs-date.css" />
		<script src="js/hgs-date.js"></script>-->
		<!--/********************日期控件**************************/-->
		<input id="index-shop-lists-id" type="hidden">
		<input id="index-shop-lists" type="hidden">
		<input id='index-end-date' type="hidden" />
		<input id='index-start-date' type="hidden" />
		<input id='index-user_id' type="hidden" />
		<!--/***************************************************/-->

		<!--<script type="text/javascript" src="js/jsencrypt.min.js"></script>
		<script src="js/md5.js"></script>-->
		<script src="js/crypto-js.js"></script>
		<script src="js/jquery.js"></script>		
		<script type="text/javascript" src="js/common.js"></script>
		<script type="text/javascript" src="js/fuction.js"></script>


		<script>
			var tmpdelid='0';//定义一个要删除门店的ID  
			
			mui.ready(function() {
				//获取当前的客户数据
				xminereadyload();

				//获取我的门店
				shop_lists_me_stone();
			});
			
			//获取我的门店
			function shop_lists_me_stone(){				
				var xbx = {};

				//登录后的参数对象AES加密
				official_login_after(url_host + 'shop/lists', xbx, 'shop_lists_me_stone');	
			}
		</script>
		<script>
			//$(document).ready(function(e) { 
			function shop_list_xbxline() {
				// 设定每一行的宽度=屏幕宽度+按钮宽度
				$(".line-scroll-wrapper").width($(".line-wrapper").width() + $(".line-btn-delete").width());
				// 设定常规信息区域宽度=屏幕宽度
				$(".line-normal-wrapper").width($(".line-wrapper").width());
				// 设定文字部分宽度（为了实现文字过长时在末尾显示...）
				$(".line-normal-msg").width($(".line-normal-wrapper").width() - 280);
				// 获取所有行，对每一行设置监听
				var lines = $(".line-normal-wrapper");
				var len = lines.length;
				var lastX, lastXForMobile;
				// 用于记录被按下的对象
				var pressedObj; // 当前左滑的对象
				var lastLeftObj; // 上一个左滑的对象
				// 用于记录按下的点
				var start;
				// 网页在移动端运行时的监听
				for(var i = 0; i < len; ++i) {
					lines[i].addEventListener('touchstart', function(e) {
						lastXForMobile = e.changedTouches[0].pageX;
						pressedObj = this; // 记录被按下的对象 			
						// 记录开始按下时的点
						var touches = event.touches[0];
						start = {
							x: touches.pageX, // 横坐标
							y: touches.pageY // 纵坐标
						};
					});
					lines[i].addEventListener('touchmove', function(e) {
						// 计算划动过程中x和y的变化量
						var touches = event.touches[0];
						delta = {
							x: touches.pageX - start.x,
							y: touches.pageY - start.y
						};
						// 横向位移大于纵向位移，阻止纵向滚动
						if(Math.abs(delta.x) > Math.abs(delta.y)) {
							event.preventDefault();
						}
					});
					lines[i].addEventListener('touchend', function(e) {
						if(lastLeftObj && pressedObj != lastLeftObj) { // 点击除当前左滑对象之外的任意其他位置
							$(lastLeftObj).animate({
								marginLeft: "0"
							}, 100); // 右滑
							lastLeftObj = null; // 清空上一个左滑的对象
						}
						var diffX = e.changedTouches[0].pageX - lastXForMobile;
						if(diffX < -150) {
							$(pressedObj).animate({
								marginLeft: "-100px"
							}, 100); // 左滑
							lastLeftObj && lastLeftObj != pressedObj &&
								$(lastLeftObj).animate({
									marginLeft: "0"
								}, 100); // 已经左滑状态的按钮右滑
							lastLeftObj = pressedObj; // 记录上一个左滑的对象
						} else if(diffX > 150) {
							if(pressedObj == lastLeftObj) {
								$(pressedObj).animate({
									marginLeft: "0"
								}, 100); // 右滑
								lastLeftObj = null; // 清空上一个左滑的对象
							}
						}
					});
				}

			}

			function xbxbar() {
				// 网页在PC浏览器中运行时的监听
				for(var i = 0; i < len; ++i) {
					$(lines[i]).bind('mousedown', function(e) {
						lastX = e.clientX;
						pressedObj = this; // 记录被按下的对象
					});
					$(lines[i]).bind('mouseup', function(e) {
						if(lastLeftObj && pressedObj != lastLeftObj) { // 点击除当前左滑对象之外的任意其他位置
							$(lastLeftObj).animate({
								marginLeft: "0"
							}, 500); // 右滑
							lastLeftObj = null; // 清空上一个左滑的对象
						}
						var diffX = e.clientX - lastX;
						if(diffX < -150) {
							$(pressedObj).animate({
								marginLeft: "-132px"
							}, 500); // 左滑
							lastLeftObj && lastLeftObj != pressedObj &&
								$(lastLeftObj).animate({
									marginLeft: "0"
								}, 500); // 已经左滑状态的按钮右滑
							lastLeftObj = pressedObj; // 记录上一个左滑的对象
						} else if(diffX > 150) {
							if(pressedObj == lastLeftObj) {
								$(pressedObj).animate({
									marginLeft: "0"
								}, 500); // 右滑
								lastLeftObj = null; // 清空上一个左滑的对象
							}
						}
					});
				}
			}
			//});
		</script>
	</body>

</html>